<template>
  <div id="app">
    <router-view/>
    <FootGuide v-if="$route.meta.showFooter"></FootGuide>
  </div>
</template>

<script>
  import {mapActions} from 'vuex'
  import FootGuide from './components/FootGuide/FootGuide'

  export default {
    mounted () {
      // 方式一
      /*this.$store.dispatch('getAddress')*/
      // 方式二 2
      this.getAddress()
    },
    methods: {
      // 方式二 1
      // getAddress: mapActions(['getAddress']),
      ...mapActions(['getAddress'])
    },
    components: {
      FootGuide
    }
  }
</script>

<style lang="stylus" rel="stylesheet/stylus">
  #app
    width 100%
    height 100%
    background #f5f5f5

  /*position relative*/
</style>
